package pojo.dao.manager.impl;

import java.sql.Connection;
import java.util.List;

import javax.annotation.ManagedBean;

import pojo.Book;
import pojo.Order;
import pojo.User;
import pojo.dao.PojoDao;
import pojo.dao.impl.PojoDaoImpl;
import pojo.dao.manager.PojoDaoManager;

public class PojoDaoManagerImpl implements PojoDaoManager {

	private PojoDao pdi;
	
	/**
	 * 
	 */
	public PojoDaoManagerImpl() {
		pdi=PojoDaoManagerFactory.getInstanceDao();
	}

	@Override
	public boolean findUser(User user, Connection connection) {
		// TODO Auto-generated method stub
		return pdi.findUser(user, connection);
	}

	@Override
	public List<Book> findBooks(Connection connection) {
		// TODO Auto-generated method stub
		return pdi.findBooks(connection);
	}

	@Override
	public int addOrder(Order order, Connection connection) {
		// TODO Auto-generated method stub
		return pdi.addOrder(order, connection);
	}

	public String getUserId(User user, Connection connection) {
		// TODO Auto-generated method stub
		return pdi.getUserId(user, connection);
	}

}
